Add PHP 8.0-8.5 support#36
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Widen PHP runtime compatibility and CI coverage to begin validating this library on PHP 8.x while retaining PHP 7.4 support.
Changes:
- Broaden
composer.jsonPHP requirement from^7.4to^7.4 || ^8.0. - Expand the GitHub Actions CI matrix to run on PHP 7.4 and PHP 8.0–8.5 (with and without
--prefer-lowest).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| composer.json | Advertises support for PHP 8.x in the Composer runtime requirement. |
| .github/workflows/ci.yml | Expands CI to exercise the test suite across PHP 7.4 and PHP 8.0–8.5. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
84aa079 to
6ed54b0
Compare
… actions
- composer.json php: ^7.4 -> ^7.4 || ^8.0
- composer.json require-dev:
- phpunit ^8.5.52 -> ^9.6
- mockery ^1.3.1 -> ^1.6 (PHPUnit 9 + PHP 8 compatible)
- graze/console-diff-renderer ^0.6.1 -> ^1.0 (just-tagged v1.1.0 supports PHP 8.0-8.5
and allows symfony/console ^5)
- symfony/console ^4 | ^5 -> ^5 (4.x cap was only there because the old
console-diff-renderer required it)
- add dms/phpunit-arraysubset-asserts ^0.5 (polyfill for the assertion PHPUnit 9 removed)
- CI matrix: ['7.4'] -> ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
- actions/checkout: @v5 -> @v6 (cache@v6 doesn't exist; kept @v5)
- PHPUnit 9 test migration:
- assertRegExp -> assertMatchesRegularExpression (8 sites)
- @ExpectedException annotations -> $this->expectException(...) (7 sites)
- PoolLoggerTest uses ArraySubsetAsserts trait for assertArraySubset
PHP 7.4 validated locally: 131 tests, 696 assertions, OK; phpcs clean;
no Composer advisories. CI matrix will validate the actual PHP 8.x reach.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6ed54b0 to
630841e
Compare
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Widens runtime PHP support from
^7.4to^7.4 || ^8.0(PHP 7.4 retained — primary consumers run on 7.4) and modernises the dev-dep stack so the suite actually runs on PHP 8.x.Changes
composer.jsonphp^7.4→^7.4 || ^8.0composer.jsonrequire-devphpunit ^8.5.52→^9.6;mockery ^1.3.1→^1.6;graze/console-diff-renderer ^0.6.1→^1.0(v1.1.0 adds PHP 8 support and stops cappingsymfony/console);symfony/console ^4 | ^5→^5; +dms/phpunit-arraysubset-asserts ^0.5(polyfill)composer.lock['7.4']→['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'](highest), plus--prefer-lowestonly on 7.4 — dep floors live at 7.4, so a lowest run on PHP 8 would install deps that don't actually run on 8.xphpcs.xml.dist(new)graze/standardsand excludesSquiz.Commenting.FunctionComment.TypeHintMissing— that message demands a nativemixedtype hint on PHP 8+, butmixedis invalid PHP 7.4 syntax. All otherFunctionCommentchecks stay activephpcs --standard=./phpcs.xml.distruns on every PHP version (highest jobs); skipped only on the--prefer-lowestPHP 7.4 jobactions/checkout@v5→@v6(cache@v6doesn't exist yet; kept@v5)assertRegExp→assertMatchesRegularExpression(×8);@expectedExceptionannotations →$this->expectException(...)(×7);PoolLoggerTestusesArraySubsetAssertstrait for the removedassertArraySubset.gitignore.phpunit.result.cache(PHPUnit 9 leaves this behind)Verification
CI matrix — all green: PHP 7.4 (highest + lowest) + PHP 8.0, 8.1, 8.2, 8.3, 8.4, 8.5. 131 tests / 696 assertions OK on every version; phpcs clean on every PHP version; no Composer security advisories.
🤖 Generated with Claude Code